package com.lastproject.ejb.entities;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "employee")
@Inheritance(strategy=InheritanceType.JOINED)
@NamedQuery(name = "Employee.findAll", query = "SELECT e from Employee e")
public class Employee extends User implements Serializable {

	private static final long serialVersionUID = -1227786306623258869L;
	
	private int prosisNr;
	private String workPhone;
	private boolean isDepartmentManager;
	private boolean isTeamLeader;
	

	private String germanContactPerson;
	private String careerLevel;
	
	@ManyToOne
	@JoinColumn(name = "idDepartment")
	private Department department;
	
	@OneToOne
	@JoinColumn(name="idSuperior")
	private Employee superior;
	
	@OneToMany(mappedBy = "employee")
	private List<Report> reports;
	
	@OneToMany(mappedBy = "interviewer")
	private List<Interview> interviews;
	
	public Employee() {
		super();
	}

	public int getProsisNr() {
		return prosisNr;
	}

	public void setProsisNr(int prosisNr) {
		this.prosisNr = prosisNr;
	}

	public String getWorkPhone() {
		return workPhone;
	}

	public void setWorkPhone(String workPhone) {
		this.workPhone = workPhone;
	}	

	public Department getDepartment() {
		return department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	public String getGermanContactPerson() {
		return germanContactPerson;
	}

	public void setGermanContactPerson(String germanContactPerson) {
		this.germanContactPerson = germanContactPerson;
	}

	public String getCareerLevel() {
		return careerLevel;
	}

	public boolean isDepartmentManager() {
		return isDepartmentManager;
	}

	public void setDepartmentManager(boolean isDepartmentManager) {
		this.isDepartmentManager = isDepartmentManager;
	}

	public boolean isTeamLeader() {
		return isTeamLeader;
	}

	public void setTeamLeader(boolean isTeamLeader) {
		this.isTeamLeader = isTeamLeader;
	}
	
	public void setCareerLevel(String careerLevel) {
		this.careerLevel = careerLevel;
	}
	
	public Employee getSuperior() {
		return superior;
	}

	public void setSuperior(Employee superior) {
		this.superior = superior;
	}

	public List<Report> getReports() {
		return reports;
	}

	public void setReports(List<Report> reports) {
		this.reports = reports;
	}

	public List<Interview> getInterviews() {
		return interviews;
	}

	public void setInterviews(List<Interview> interviews) {
		this.interviews = interviews;
	}

	

	

}
